<?php
$code = <<<EOF
/**
 * @Description: 构建中台http请求
 * @param ctx
 * @param params
 * @param body
 * @param method
 * @param path
 * @return *client.Response
 * @return error
 */
func (m *Manager) HttpRequestForCenter(ctx context.Context, params map[string]string, body map[string]interface{}, method, path string) (*client.Response, error) {
	req := client.NewRequest(ctx).
		WithMethod(method).
		WithPath(path).
		WithMultiQueryParam(params).
		WithStruct(body).
		AddHeader("uberctx-_namespace_appkey_", "facetalk").
		AddHeader("Appname", "facetalk").
		AddHeader("Gwtoken", "0d48ff6306597984")
	resp, err := m.gatewayAPI.Call(ctx, req)
	logging.Infof("Logout err:%v, path:%v, params:%v, body:%v, resp:%v", err, path, params, body, resp)
	if err != nil {
		logging.Errorf("Logout err:%v, path:%v, params:%v, body:%v, resp:%v", err, path, params, body, resp)
		return nil, err
	}
	return resp, err
}
EOF;
?>
<?= $code?>
